# NV GLUT paths
SET( CMAKE_INCLUDE_PATH $ENV{NVSDKCOMPUTE_ROOT}/shared/inc )

IF("${ISWIN64}" STREQUAL "Win64") 
	SET( CMAKE_LIBRARY_PATH $ENV{NVSDKCOMPUTE_ROOT}/shared/lib/x64 )
ELSE("${ISWIN64}" STREQUAL "Win64") 
	SET( CMAKE_LIBRARY_PATH $ENV{NVSDKCOMPUTE_ROOT}/shared/lib/Win32 )
ENDIF("${ISWIN64}" STREQUAL "Win64") 

FIND_PACKAGE(GLUT REQUIRED)
FIND_PACKAGE(OpenGL REQUIRED)
FIND_PACKAGE(GLEW REQUIRED)

IF(WIN32)
		SET( GLUT_LIBRARIES "freeglut.lib")
ENDIF(WIN32)

MESSAGE("${GLEW_INCLUDE_PATH}")
configure_file(GLinterop.cl ${CMAKE_CURRENT_BINARY_DIR}/GLinterop.cl COPYONLY)
link_directories(${CMAKE_LIBRARY_PATH} ${GLEW_LIBRARY_PATH})
add_executable( GLinterop GLinterop.cpp )
include_directories( ${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
target_link_libraries( GLinterop ${OPENCL_LIBRARIES} ${GLUT_LIBRARIES} ${GLEW_LIBRARY} )
